package animation;

import screen.Loading;

public class AnyKey extends Thread {

	Loading loading;
	int time;
	
	public AnyKey(Loading loading) {
		this.loading = loading;
	}

	public void run() {
		try {
			while (loading.isInterrupt() == false) {

				if (time == 0) {
					loading.getAjou().setShowText(
							!loading.getAjou().isShowText());
				}
				loading.getAjou().repaint();
				Thread.sleep(50);
				
				loading.getAjou().adjustAngle(0.5);
				time++;
				if(time == 10) 	time = 0;
			}
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
